const path = require('path');

module.exports = {
	//配置入口文件
	entry:{
		app:'./src/index.js',
		print:'./src/print.js'
	},
	//配置输出文件
	output:{
		filename:'[name].bundle.js',
		path:path.resolve(__dirname,'dist')
	},
	//module配置loader模块
	module:{
		rules:[
			{
				test:/.css$/,
				use:[
					'style-loader',
					'css-loader'
				]
			},
			{
				test:/.(png|svg|jpe?g|gif|webp)$/,
				use:[
					'file-loader'
				]
			}
		]
	}
}
